package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonTypeInfo;

import java.util.List;

@TableName("t_dept")
public class DeptBean {
    @TableId(value = "pk_deptId", type = IdType.AUTO)
    private Integer id;
    @TableField("d_name")
    private String name;
    @TableField("d_master")
    private String master;
    @TableField(exist = false)
    private List<EmployeeBean> emList;

    public DeptBean() {
    }

    public DeptBean(String name, String master) {
        this.name = name;
        this.master = master;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMaster() {
        return master;
    }

    public void setMaster(String master) {
        this.master = master;
    }

    public List<EmployeeBean> getEmList() {
        return emList;
    }

    public void setEmList(List<EmployeeBean> emList) {
        this.emList = emList;
    }

    @Override
    public String toString() {
        return "DeptBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", master='" + master + '\'' +
                ", emList=" + emList +
                '}';
    }
}
